//
// Created by Administrator on 2023/7/28.
//
#include <vector>
#include <string>
#include <iostream>

using namespace std;

class Solution {
public:
    int countPrefixes(vector<string> &words, string s) {
        int count = 0;
        for (string &word: words) {
            if (s.find(word) == 0)
                count++;
        }
        return count;
    }
};

int main() {
    vector<string> words{"a", "b", "c", "ab", "bc", "abc"};
    Solution s;
    cout << s.countPrefixes(words, "abc") << endl;
}